<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:f="http://java.sun.com/jsf/core"  
      xmlns:p="http://primefaces.org/ui" 
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:body>
        <p:outputPanel >
            <h:form id="outputPanelMail">
                <p:messages/>
                <h:panelGrid columns="2">
                    <h:outputText value="Seu Email: "/>
                    <p:inputText id="email" value="#{indexController.mensagem.destino}" size="40" required="true" requiredMessage="Informe seu email!!">
                        <p:focus/>
                        <p:watermark for="email" value="informe seu email" />
                    </p:inputText>
                    <h:outputText value="Assunto: "/>
                    <p:inputText value="#{indexController.mensagem.titulo}" size="40" id="assunto" required="true" requiredMessage="Informe o assunto!!">
                        <p:watermark for="assunto" value="Informe o assunto" />
                    </p:inputText>
                    <h:outputText value="Mensagem: "/>
                    <p:inputTextarea value="#{indexController.mensagem.mensagem}" id="mensagem" cols="50" rows="10" autoResize="false" required="true" requiredMessage="Digite uma mensagem!!">
                        <p:watermark for="mensagem" value="informe a mensagem" />
                    </p:inputTextarea>
                </h:panelGrid>
                <p:commandButton value="Enviar mensagem" image="ui-icon-mail-closed" action="#{indexController.enviaEmail}" update="outputPanelMail" onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
                <p:commandButton value="Limpar campos" image="ui-icon-circle-close" action="#{indexController.limpaCampos}" update="@form" process="@this"/>
                <p:commandButton value="Fechar" image="ui-icon-circle-close" onclick="dlg.hide()"/>
            </h:form>
        </p:outputPanel>
    </h:body>
</html>